package com.wxy.demo.controller;

import com.wxy.demo.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * <p>
 * 异步接口测试
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2022/9/30 16:07
 */
@RestController
@RequestMapping("async")
public class AsyncController {

    @Autowired
    private TaskService taskService;

    @GetMapping("demo1")
    public String demo1() {
        taskService.doTask();
        return "success:" + LocalDateTime.now();
    }
}
